#ifndef KEYPRESSEATER_H
#define KEYPRESSEATER_H

#include <QKeyEvent>
#include <QObject>
#include <functional>

class KeyPressEater : public QObject
{
    Q_OBJECT
public:
    explicit KeyPressEater(std::function<bool(QKeyEvent*)> func, QObject *parent = nullptr);

private:
    std::function<bool(QKeyEvent*)> m_func;

    // QObject interface
public:
    bool eventFilter(QObject *watched, QEvent *event);
};

#endif // KEYPRESSEATER_H
